package com.fancon.rage.comic.domain;

import com.googlecode.objectify.Key;
import com.googlecode.objectify.ObjectifyService;
import com.googlecode.objectify.helper.DAOBase;

public class ImageDao extends DAOBase {

    static {
        ObjectifyService.register(Image.class);
    }

    public Image save(Image photo) {
        ofy().put(photo);
        return photo;
    }
    
    public Image findById(Long id) {
        Key<Image> key = new Key<Image>(Image.class, id);
        return ofy().get(key);
    }
}